home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIDragService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  167 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDragService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDragService_h__
  6. #define __gen_nsIDragService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupportsArray_h__
  14. #include "nsISupportsArray.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIDragSession_h__
  18. #include "nsIDragSession.h"
  19. #endif
  20.  
  21. #ifndef __gen_nsIScriptableRegion_h__
  22. #include "nsIScriptableRegion.h"
  23. #endif
  24.  
  25. /* For IDL files that don't want to include root IDL files. */
  26. #ifndef NS_NO_VTABLE
  27. #define NS_NO_VTABLE
  28. #endif
  29. class nsIDOMNode; /* forward declaration */
  30.  
  31.  
  32. /* starting interface:    nsIDragService */
  33. #define NS_IDRAGSERVICE_IID_STR "8b5314bb-db01-11d2-96ce-0060b0fb9956"
  34.  
  35. #define NS_IDRAGSERVICE_IID \
  36.   {0x8b5314bb, 0xdb01, 0x11d2, \
  37.     { 0x96, 0xce, 0x00, 0x60, 0xb0, 0xfb, 0x99, 0x56 }}
  38.  
  39. class NS_NO_VTABLE nsIDragService : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSERVICE_IID)
  43.  
  44.   enum { DRAGDROP_ACTION_NONE = 0 };
  45.  
  46.   enum { DRAGDROP_ACTION_COPY = 1 };
  47.  
  48.   enum { DRAGDROP_ACTION_MOVE = 2 };
  49.  
  50.   enum { DRAGDROP_ACTION_LINK = 4 };
  51.  
  52.   /**
  53.     * Starts a modal drag session with an array of transaferables 
  54.     *
  55.     * @param  aTransferables - an array of transferables to be dragged
  56.     * @param  aRegion - a region containing rectangles for cursor feedback, 
  57.     *            in window coordinates.
  58.     * @param  aActionType - specified which of copy/move/link are allowed
  59.     */
  60.   /* void invokeDragSession (in nsIDOMNode aDOMNode, in nsISupportsArray aTransferables, in nsIScriptableRegion aRegion, in unsigned long aActionType); */
  61.   NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType) = 0;
  62.  
  63.   /**
  64.     * Returns the current Drag Session  
  65.     */
  66.   /* nsIDragSession getCurrentSession (); */
  67.   NS_IMETHOD GetCurrentSession(nsIDragSession **_retval) = 0;
  68.  
  69.   /**
  70.     * Tells the Drag Service to start a drag session. This is called when
  71.     * an external drag occurs
  72.     */
  73.   /* void startDragSession (); */
  74.   NS_IMETHOD StartDragSession(void) = 0;
  75.  
  76.   /**
  77.     * Tells the Drag Service to end a drag session. This is called when
  78.     * an external drag occurs
  79.     */
  80.   /* void endDragSession (); */
  81.   NS_IMETHOD EndDragSession(void) = 0;
  82.  
  83. };
  84.  
  85. /* Use this macro when declaring classes that implement this interface. */
  86. #define NS_DECL_NSIDRAGSERVICE \
  87.   NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType); \
  88.   NS_IMETHOD GetCurrentSession(nsIDragSession **_retval); \
  89.   NS_IMETHOD StartDragSession(void); \
  90.   NS_IMETHOD EndDragSession(void); 
  91.  
  92. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  93. #define NS_FORWARD_NSIDRAGSERVICE(_to) \
  94.   NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType) { return _to InvokeDragSession(aDOMNode, aTransferables, aRegion, aActionType); } \
  95.   NS_IMETHOD GetCurrentSession(nsIDragSession **_retval) { return _to GetCurrentSession(_retval); } \
  96.   NS_IMETHOD StartDragSession(void) { return _to StartDragSession(); } \
  97.   NS_IMETHOD EndDragSession(void) { return _to EndDragSession(); } 
  98.  
  99. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  100. #define NS_FORWARD_SAFE_NSIDRAGSERVICE(_to) \
  101.   NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType) { return !_to ? NS_ERROR_NULL_POINTER : _to->InvokeDragSession(aDOMNode, aTransferables, aRegion, aActionType); } \
  102.   NS_IMETHOD GetCurrentSession(nsIDragSession **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentSession(_retval); } \
  103.   NS_IMETHOD StartDragSession(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDragSession(); } \
  104.   NS_IMETHOD EndDragSession(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndDragSession(); } 
  105.  
  106. #if 0
  107. /* Use the code below as a template for the implementation class for this interface. */
  108.  
  109. /* Header file */
  110. class nsDragService : public nsIDragService
  111. {
  112. public:
  113.   NS_DECL_ISUPPORTS
  114.   NS_DECL_NSIDRAGSERVICE
  115.  
  116.   nsDragService();
  117.  
  118. private:
  119.   ~nsDragService();
  120.  
  121. protected:
  122.   /* additional members */
  123. };
  124.  
  125. /* Implementation file */
  126. NS_IMPL_ISUPPORTS1(nsDragService, nsIDragService)
  127.  
  128. nsDragService::nsDragService()
  129. {
  130.   /* member initializers and constructor code */
  131. }
  132.  
  133. nsDragService::~nsDragService()
  134. {
  135.   /* destructor code */
  136. }
  137.  
  138. /* void invokeDragSession (in nsIDOMNode aDOMNode, in nsISupportsArray aTransferables, in nsIScriptableRegion aRegion, in unsigned long aActionType); */
  139. NS_IMETHODIMP nsDragService::InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* nsIDragSession getCurrentSession (); */
  145. NS_IMETHODIMP nsDragService::GetCurrentSession(nsIDragSession **_retval)
  146. {
  147.     return NS_ERROR_NOT_IMPLEMENTED;
  148. }
  149.  
  150. /* void startDragSession (); */
  151. NS_IMETHODIMP nsDragService::StartDragSession()
  152. {
  153.     return NS_ERROR_NOT_IMPLEMENTED;
  154. }
  155.  
  156. /* void endDragSession (); */
  157. NS_IMETHODIMP nsDragService::EndDragSession()
  158. {
  159.     return NS_ERROR_NOT_IMPLEMENTED;
  160. }
  161.  
  162. /* End of implementation class template. */
  163. #endif
  164.  
  165.  
  166. #endif /* __gen_nsIDragService_h__ */
  167.